package com.hx.enums;

/**
 * 自定义枚举类
 *
 * @author jxlgcmh
 * @create 2019-05-12 09:16
 */
public class Seasons {

    private final String seasonName;
    private final String seasonDesc;

    //构造器私有化，并且给成员变量符初值
    private Seasons(String seasonName, String seasonDesc) {
        this.seasonName = seasonName;
        this.seasonDesc = seasonDesc;
    }


    //构建多个对象
    public static final Seasons SPRING = new Seasons("春天", "春暖花开");
    public static final Seasons SUMMER = new Seasons("夏天", "夏日炎炎");
    public static final Seasons AUTUMN = new Seasons("秋天", "秋高气爽");
    public static final Seasons WINTER = new Seasons("冬天", "冬雪皑皑");

    public String getSeasonName() {
        return seasonName;
    }

    public String getSeasonDesc() {
        return seasonDesc;
    }


    @Override
    public String toString() {
        return "Seasons{" +
                "seasonName='" + seasonName + '\'' +
                ", seasonDesc='" + seasonDesc + '\'' +
                '}';
    }
}
